class base {  // 基类
  constructor(data, message) {
   if (typeof data === 'string') {
     this.message = data;
     data = null;
     message = null;
   } 
   if (data) {
     this.data = data;
   }
   if (message) {
     this.message = message
   }
  }
}
// 继承 方法  属性
class SuccessModel extends base {
  constructor(data, message) {
    super(data, message) // 执行父
    this.errno = 0
  }
}

class FailModel extends base {
  constructor(data, message) {
    super(data, message) // 执行父
    this.errno = -1
  }
}

module.exports = {
  SuccessModel,
  FailModel
}